<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>抢红包</title>
</head>
<body>
<style>
    form{
        width:70%;
        margin:30% auto;
        background-color: lightgray;
        font-size: 20px;
        padding:3%;
    }
    #phone{
        display: inline-block;
        width:100%;
        font-size: 1em;
        overflow: hidden;
        margin:10px 0;
        padding:0;
        border:none;  /*注意边框*/
    }
    #button{
        margin:10px 0;
        font-size:1em;
    }
</style>

<form action="/v1/users/phone" method="POST">
    {% csrf_token %}
    <label for="phone">手机号:</label><br>
    {% if code == 200 %}
        <input id="phone" type="text" placeholder="手机号" name="phone"><br>
    {% elif code != 200 %}
        <input id="phone" type="text" placeholder="手机号" name="phone" value="{{ phone }}"><br>
        <span style="color:red;">{{ msg }}</span><br>
    {% endif %}
    <input id="button" type="submit" value="提交">
</form>


</body>
</html>